<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html>

    <head>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <title>LeisBlog | Cats</title>

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">
        <link href="/static/css/animate.css" rel="stylesheet">
        <link href="/static/css/style.css" rel="stylesheet">
        <link href="/static/css/plugins/footable/footable.core.css" rel="stylesheet"> 
        <script data-main="/static/js/admin-frame.js" src="/static/js/require.min.js"></script>
    </head>

    <body class="white-bg">
        <i id="scriptTag">/static/js/admin/admin-cat-config.js</i>
        <div class="panel panel-primary">
            <div class="panel-heading">
                分类管理
            </div>
            <div class="panel-body">
                <div class="tabs-container">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a data-toggle="tab" href="#tags-add">
                                分类创建
                            </a>
                        </li>
                        <li>
                            <a data-toggle="tab" href="#tags-list">分类列表</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div id="tags-add" class="tab-pane active">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-lg-5">
                                        <form class="form-horizontal" id="cat-config-form">
                                            <div class="form-group">
                                                <label class="col-lg-2 control-label">一级分类</label>
                                                <div class="col-lg-10">
                                                    <select class="form-control" name="p_id" id="p-cat">
                                                        <option value="0">无</option>
                                                        <?php foreach ($cats as $item): ?>
                                                            <option value="<?php echo $item['cat_id']; ?>"><?php echo $item['cat_name']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-lg-2 control-label">分类名</label>
                                                <div class="col-lg-10">
                                                    <input type="text" name="cat-name" id="cat-name" class="form-control">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-lg-offset-2 col-lg-10">
                                                    <button id="cat-add-btn" class="btn btn-white" type="button"><i class="fa fa-check text-navy"></i></button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="tags-list" class="tab-pane">
                            <div class="panel-body">
                                <div id="nestable-menu">
                                    <button type="button" class="btn btn-white btn-sm" data-action="expand-all">展开</button>
                                    <button type="button" class="btn btn-white btn-sm" data-action="collapse-all">收起</button>
                                </div>
                                <div class="dd" id="nestable">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </body>

</html>



